-- item
-- created by panyl
-- 地牢格子：物品（可拾取类）

return {
    restoreGrid = function(grid, info)
         if not info or not info.bonus then
             return;
         end
         
         if info.bonus.e then
            grid.bonus = info.bonus:toTable();
         else
            grid.bonus = info.bonus;
         end
    end,

    -- 收集上下文
    collectContext = function(grid)
        local ret = {};
        
        ret.bonus = grid.bonus;
        
        return ret;
    end
};
